﻿@model Adams.Web.Models.EidPrayers.Location.PageLoad
@{
    Layout = "~/Views/Shared/_ContentLayout.Mobile.cshtml";
}
@section Head{
    <link rel="stylesheet" type="text/css" href="@Url.Content("/Content/Eid/location.css")" />
}
<div id="map">
</div>
@{
    string addresslist = string.Empty;
    string maphtml = "<b>" + Model.Location.Name + " Eid</b><br/>" + Model.Location.Street + " " + (string.IsNullOrEmpty(Model.Location.Street2) ? string.Empty : "<br />" + Model.Location.Street2) + "<br />" + Model.Location.City + " " + Model.Location.State + " " + Model.Location.ZipCode + "<br/><br/><a href=\\\"http://maps.google.com/maps?q=" + Model.Location.Street + " " + Model.Location.Street2 + " " + Model.Location.City + " " + Model.Location.State + " " + Model.Location.ZipCode + "\\\">Get Directions</a>";
    var s = Model.Location.DisplayOrder.ToString() + "$" + Model.Location.Latitude.ToString() + "$" + Model.Location.Longitude.ToString() + "$" + maphtml;
    addresslist += "\"" + s + "\"";
}

@foreach (var prayer in Model.Location.Prayers)
{
    <div class="prayer">
    @prayer.Time
    </div>
}
<div class="clear"></div>
<br />
@Html.Raw(Model.Location.LongNote)
@section Scripts {
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=@Adams.Shared.Config.GetAppSetting("GoogleMapAPIKey")" type="text/javascript"></script>
    <script type="text/javascript">
    var address = new Array(@Html.Raw(addresslist));
    </script>
    <script src="/Scripts/Eid/location.js" type="text/javascript"></script>
}